import request from "../utils/request";

const prefix="/universal-service/comment"

export function saveComment(comment){
    return request({
        url:prefix.concat("/save"),
        method:'post',
        data:comment
    })
}

export function listComment(current,size,id,flag,parentId){
    return request({
        url:prefix.concat("/page/v1"),
        method:'get',
        params:{
            current:current,
            size:size,
            id:id,
            flag:flag,
            parentId:parentId
        }
    })
}

export function manageComment(param){
    return request({
        url:prefix.concat('/manage/page'),
        method:'get',
        params:param
    })
}

export function deleteComment(id){
    return request({
        url:prefix.concat("/delete/",id),
        method:'post'
    })
}
export function updateComment(param){
    return request({
        url:prefix.concat('/update'),
        method:'post',
        data:param
    })
}

export function restoreComment(id){
    return request({
        url:prefix.concat('/restore'),
        method:'post',
        params:{
            id:id
        }
    })
}
